﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MODEL;

namespace Service
{
    public class UserMangement_Design : IUserMangementService
    { 
        public Task<IEnumerable<User>> GetAllUserByGroup(User user)
        {
            return Task<IEnumerable<User>>.Run(() => {
                return new List<User> {
                    new User {
                        Id = 1,
                        UserId = "admin",
                        UserName = "admin",
                        State = "0",
                        Sex = "男",
                        Birth = DateTime.Now,
                        Industry = "IT",
                        Department = "IT",
                        TelNumber = "1234567",
                        Address = "高新",
                        Email = "123@456.com",
                        Mark = "X",
                        AccountStatus = string.Empty,
                        Province = "四川",
                        City = "成都",
                        County = "双流",
                        AddManId = "1",
                        SignKey = string.Empty,
                        StartTime = "2017-01-01",
                        EndTime = "2017-01-02"

                    } }.AsEnumerable();
            });
        }

        public Task<IEnumerable<string>> QueryUserIndustry()
        {
            return Task.Run<IEnumerable<string>>(() =>
            {
                return new List<string> { "农业", "IT", "金融" }.AsEnumerable();
            });
        }

        public bool Login(string userId, string password)
        {
            throw new NotImplementedException();
        }
    }
}
